68
I have a hierarchy and I need to filter only root items that match, with thier childs

with ComboBox1 do
begin
	LinesAtRoot := EXCOMBOBOXLib_TLB.exLinesAtRoot;
	FilterInclude := EXCOMBOBOXLib_TLB.exRootsWithChilds;
	with (IUnknown(Columns.Add('Column')) as EXCOMBOBOXLib_TLB.Column) do
	begin
		DisplayFilterButton := True;
		FilterType := EXCOMBOBOXLib_TLB.exFilter;
		Filter := 'R1';
	end;
	with Items do
	begin
		h := AddItem('R1');
		InsertItem(h,Null,'C1');
		InsertItem(h,Null,'C2');
		ExpandItem[h] := True;
		h := AddItem('R2');
		InsertItem(h,Null,'C1');
		InsertItem(h,Null,'C2');
	end;
	ApplyFilter();
end
66
I have a hierarchy and I need to filter only parent items that match, including thier childs

with ComboBox1 do
begin
	LinesAtRoot := EXCOMBOBOXLib_TLB.exLinesAtRoot;
	FilterInclude := EXCOMBOBOXLib_TLB.exItemsWithChilds;
	with (IUnknown(Columns.Add('Column')) as EXCOMBOBOXLib_TLB.Column) do
	begin
		DisplayFilterButton := True;
		FilterType := EXCOMBOBOXLib_TLB.exFilter;
		Filter := 'R1';
	end;
	with Items do
	begin
		h := AddItem('R1');
		InsertItem(h,Null,'C1');
		InsertItem(h,Null,'C2');
		ExpandItem[h] := True;
		h := AddItem('R2');
		InsertItem(h,Null,'C1');
		InsertItem(h,Null,'C2');
	end;
	ApplyFilter();
end
558
I do not like to specify the item padding for every column I add. The question is how can I do it automatically

with ComboBox1 do
begin
	BeginUpdate();
	AttachTemplate('handle AddColumn(Column){Column{Def(48)=8;Def(49)=8;AllowDragging=False;AllowSizing = True}}');
	HeaderAppearance := EXCOMBOBOXLib_TLB.Etched;
	DrawGridLines := EXCOMBOBOXLib_TLB.exAllLines;
	GridLineStyle := EXCOMBOBOXLib_TLB.exGridLinesVSolid;
	with Columns do
	begin
		Add('Item');
		with (IUnknown(Add('Pos')) as EXCOMBOBOXLib_TLB.Column) do
		begin
			Position := 0;
			Width := 32;
			AllowSizing := False;
			FormatColumn := '1 index ``';
		end;
	end;
	with Items do
	begin
		AddItem('Item A');
		AddItem('Item B');
		AddItem('Item C');
	end;
	EndUpdate();
end
472
I cannot seem to get autosearch=1 (contains) in the column object to search properly. It still only finds items that start with the typed character. I want to it look to see if the typed character(s) are contained in the item. I Can't seem to get this to work

with ComboBox1 do
begin
	BeginUpdate();
	Style := EXCOMBOBOXLib_TLB.DropDownList;
	HeaderVisible := False;
	AutoSearch := True;
	AutoDropDown := True;
	IntegralHeight := True;
	(IUnknown(Columns.Add('Default')) as EXCOMBOBOXLib_TLB.Column).AutoSearch := EXCOMBOBOXLib_TLB.exContains;
	with Items do
	begin
		AddItem('This is a bit of text');
		AddItem('This is a another text');
	end;
	EndUpdate();
end
94
I can't scroll to the end of the data. What can I do

with ComboBox1 do
begin
	ScrollBySingleLine := True;
	DrawGridLines := EXCOMBOBOXLib_TLB.exRowLines;
	Columns.Add('Column');
	with Items do
	begin
		ItemHeight[AddItem(OleVariant(0))] := 13;
	end;
	PutItems(GetItems(OleVariant(0)),Null);
	with Items do
	begin
		ItemHeight[AddItem(OleVariant(1))] := 26;
	end;
	PutItems(GetItems(OleVariant(0)),Null);
	with Items do
	begin
		ItemHeight[AddItem(OleVariant(2))] := 36;
	end;
	PutItems(GetItems(OleVariant(0)),Null);
	with Items do
	begin
		ItemHeight[AddItem(OleVariant(3))] := 48;
	end;
	PutItems(GetItems(OleVariant(0)),Null);
end
469
I am using the ScrollWidth/ScrollHeight property on 0 to hide the control's scroll bars, the question is that the drop down button is disappearing. What can be done so I can still show the drop down button

with ComboBox1 do
begin
	BeginUpdate();
	LabelHeight := 40;
	ScrollWidth := 0;
	ScrollHeight := 0;
	DropDownButtonWidth := 40;
	EndUpdate();
end
514
I am using filter prompt feature, and also column's filter, just wondering if possible to compact displaying the filter bar so it won't show on multiple lines

with ComboBox1 do
begin
	BeginUpdate();
	(IUnknown(Columns.Add('Item')) as EXCOMBOBOXLib_TLB.Column).DisplayFilterButton := True;
	with (IUnknown(Columns.Add('Pos')) as EXCOMBOBOXLib_TLB.Column) do
	begin
		AllowSizing := False;
		AllowSort := False;
		Width := 32;
		FormatColumn := '1 apos ``';
		Position := 0;
	end;
	with Items do
	begin
		AddItem('Item A');
		AddItem('Item B');
		AddItem('Item C');
	end;
	FilterBarFont := (IUnknown(Font) as stdole_TLB.StdFont);
	FilterBarCaption := '`<r><i><fgcolor=808080><upline><solidline><sha ;;0>` + value';
	FilterBarPromptPattern := 'B';
	FilterBarPromptVisible := Integer(EXCOMBOBOXLib_TLB.exFilterBarCompact) Or Integer(EXCOMBOBOXLib_TLB.exFilterBarSingleLine) Or Integer(EXCOMBOBOXLib_TLB.exFilterBarVisible) Or Integer(EXCOMBOBOXLib_TLB.exFilterBarPromptVisible);
	with Columns.Item[OleVariant(0)] do
	begin
		FilterType := EXCOMBOBOXLib_TLB.exFilter;
		Filter := 'Item A|Item B';
	end;
	ApplyFilter();
	EndUpdate();
end
550
I am calling Value to change the selected value, but the selection is not visible, unless I scroll to it

with ComboBox1 do
begin
	BeginUpdate();
	ColumnAutoResize := False;
	rs := (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('ADODB.Recordset'))) as ADODB_TLB.Recordset);
	with rs do
	begin
		Open('Orders','Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExComboBox\Sample\Access\sample.accdb',1,1,Null);
	end;
	DataSource := (IUnknown(rs) as ADODB_TLB.Recordset);
	Value := OleVariant(10311);
	with Items do
	begin
		EnsureVisibleItem(FocusItem);
	end;
	EndUpdate();
end
146
I've seen that you can change the visual appearance for the scroll bar. How can I do that

with ComboBox1 do
begin
	VisualAppearance.Add(1,'c:\exontrol\images\normal.ebn');
	VisualAppearance.Add(2,'c:\exontrol\images\pushed.ebn');
	VisualAppearance.Add(3,'c:\exontrol\images\hot.ebn');
	Background[EXCOMBOBOXLib_TLB.exSBtn] := $1000000;
	Background[EXCOMBOBOXLib_TLB.exSBtnP] := $2000000;
	Background[EXCOMBOBOXLib_TLB.exSBtnH] := $3000000;
	Background[EXCOMBOBOXLib_TLB.exHSBack] := $f0f0f0;
	Background[EXCOMBOBOXLib_TLB.exVSBack] := $f0f0f0;
	Background[Integer(EXCOMBOBOXLib_TLB.exScrollHoverAll) Or Integer(EXCOMBOBOXLib_TLB.exDateScrollThumb)] := $f0f0f0;
	(IUnknown(Columns.Add('S')) as EXCOMBOBOXLib_TLB.Column).Width := 32;
	(IUnknown(Columns.Add('Level 1')) as EXCOMBOBOXLib_TLB.Column).LevelKey := OleVariant(1);
	(IUnknown(Columns.Add('Level 2')) as EXCOMBOBOXLib_TLB.Column).LevelKey := OleVariant(1);
	(IUnknown(Columns.Add('Level 3')) as EXCOMBOBOXLib_TLB.Column).LevelKey := OleVariant(1);
	(IUnknown(Columns.Add('E1')) as EXCOMBOBOXLib_TLB.Column).Width := 32;
	(IUnknown(Columns.Add('E2')) as EXCOMBOBOXLib_TLB.Column).Width := 32;
	(IUnknown(Columns.Add('E3')) as EXCOMBOBOXLib_TLB.Column).Width := 32;
	(IUnknown(Columns.Add('E4')) as EXCOMBOBOXLib_TLB.Column).Width := 32;
	ColumnAutoResize := False;
end
119
I've seen that the width of the tooltip is variable. Can I make it larger

with ComboBox1 do
begin
	ToolTipWidth := 328;
	(IUnknown(Columns.Add('tootip')) as EXCOMBOBOXLib_TLB.Column).ToolTip := 'this is a tooltip that should be very very very very very very very long';
end
2
I've added a single column, but it is displayed only on a part of the control. Is there something I can do so the column will be fully displayed on the control

with ComboBox1 do
begin
	Columns.Add('ColumnName');
	Items.AddItem('Item 1');
	Items.AddItem('Item 2');
end
473
How would you clear the displayed selection for style DropDownList. So if a user selects or searches a value in a style DropDownList, I want to know if I can reset the control back to an empty selection

// DropUp event - Occurs when the drop-down portion of the control is hidden.
procedure TForm1.ComboBox1DropUp(ASender: TObject; );
begin
	with ComboBox1 do
	begin
		Value := '';
	end
end;

// SelectionChanged event - Fired after a new item has been selected.
procedure TForm1.ComboBox1SelectionChanged(ASender: TObject; );
begin
	with ComboBox1 do
	begin
		OutputDebugString( 'You selected: ' );
		OutputDebugString( Value );
	end
end;

with ComboBox1 do
begin
	BeginUpdate();
	Style := EXCOMBOBOXLib_TLB.DropDownList;
	HeaderVisible := False;
	AutoSearch := True;
	AutoDropDown := True;
	IntegralHeight := True;
	(IUnknown(Columns.Add('Default')) as EXCOMBOBOXLib_TLB.Column).AutoSearch := EXCOMBOBOXLib_TLB.exContains;
	with Items do
	begin
		AddItem('This is a bit of text');
		AddItem('This is a another text');
		DefaultItem := InsertItem(Null,Null,'');
		ItemPosition[0] := 0;
		SortableItem[0] := False;
	end;
	EndUpdate();
end
560
How I can programmatically select a row (with regular combobox I can set the ListIndex right up to Listcount -1)

with ComboBox1 do
begin
	BeginUpdate();
	Columns.Add('Column');
	with Items do
	begin
		AddItem('Item 1');
		AddItem('Item 2');
		AddItem('Item 3');
		SelectItem[ItemByIndex[1]] := True;
	end;
	EndUpdate();
end
561
How I can programmatically select a row (method 2)

with ComboBox1 do
begin
	BeginUpdate();
	Columns.Add('Column');
	with Items do
	begin
		AddItem('Item 1');
		AddItem('Item 2');
		AddItem('Item 3');
	end;
	Value := 'Item 2';
	EndUpdate();
end
88
How do lock / fix some columns to the control, so I can see them all the time, event if I scroll the columns

with ComboBox1 do
begin
	CountLockedColumns := 1;
	BackColorLock := RGB(240,240,240);
	ColumnAutoResize := False;
	(IUnknown(Columns.Add('Locked')) as EXCOMBOBOXLib_TLB.Column).Width := 128;
	(IUnknown(Columns.Add('Un-Locked 1')) as EXCOMBOBOXLib_TLB.Column).Width := 128;
	(IUnknown(Columns.Add('Un-Locked 2')) as EXCOMBOBOXLib_TLB.Column).Width := 128;
	(IUnknown(Columns.Add('Un-Locked 3')) as EXCOMBOBOXLib_TLB.Column).Width := 128;
	with Items do
	begin
		CellCaption[OleVariant(AddItem('locked')),OleVariant(1)] := 'unlocked';
	end;
end
299
How do I vertically align a cell

with ComboBox1 do
begin
	DrawGridLines := EXCOMBOBOXLib_TLB.exRowLines;
	(IUnknown(Columns.Add('MultipleLine')) as EXCOMBOBOXLib_TLB.Column).Def[EXCOMBOBOXLib_TLB.exCellSingleLine] := OleVariant(False);
	Columns.Add('VAlign');
	with Items do
	begin
		h := AddItem('This is a bit of long text that should break the line');
		CellCaption[OleVariant(h),OleVariant(1)] := 'top';
		CellVAlignment[OleVariant(h),OleVariant(1)] := EXCOMBOBOXLib_TLB.exTop;
		h := AddItem('This is a bit of long text that should break the line');
		CellCaption[OleVariant(h),OleVariant(1)] := 'middle';
		CellVAlignment[OleVariant(h),OleVariant(1)] := EXCOMBOBOXLib_TLB.exMiddle;
		h := AddItem('This is a bit of long text that should break the line');
		CellCaption[OleVariant(h),OleVariant(1)] := 'bottom';
		CellVAlignment[OleVariant(h),OleVariant(1)] := EXCOMBOBOXLib_TLB.exBottom;
	end;
end
84
How do I use my own icons for my radio buttons

with ComboBox1 do
begin
	Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 
	'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 
	'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	RadioImage[False] := 1;
	RadioImage[True] := 2;
	(IUnknown(Columns.Add('Radio')) as EXCOMBOBOXLib_TLB.Column).Def[EXCOMBOBOXLib_TLB.exCellHasRadioButton] := OleVariant(True);
	with Items do
	begin
		AddItem('Radio 1');
		CellState[OleVariant(AddItem('Radio 2')),OleVariant(0)] := 1;
		AddItem('Radio 3');
	end;
end
83
How do I use my own icons for checkbox cells

with ComboBox1 do
begin
	Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 
	'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 
	'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	CheckImage[EXCOMBOBOXLib_TLB.Unchecked] := 1;
	CheckImage[EXCOMBOBOXLib_TLB.Checked] := 2;
	(IUnknown(Columns.Add('Check')) as EXCOMBOBOXLib_TLB.Column).Def[EXCOMBOBOXLib_TLB.exCellHasCheckBox] := OleVariant(True);
	with Items do
	begin
		AddItem('Check 1');
		CellState[OleVariant(AddItem('Check 2')),OleVariant(0)] := 1;
	end;
end
479
How do I unselect/deselect the item (Simple style)
with ComboBox1 do
begin
	BeginUpdate();
	Style := EXCOMBOBOXLib_TLB.Simple;
	Columns.Add('Def');
	with Items do
	begin
		AddItem('Item 1');
		AddItem('Item 2');
		AddItem('Item 3');
		AddItem('Item 3');
	end;
	SearchColumnIndex := 0;
	Value := 'Item 2';
	with Items do
	begin
		SelectItem[FocusItem] := False;
	end;
	EndUpdate();
end
478
How do I unselect/deselect the item (DropDownList style)
with ComboBox1 do
begin
	BeginUpdate();
	Style := EXCOMBOBOXLib_TLB.DropDown;
	Columns.Add('Def');
	with Items do
	begin
		AddItem('Item 1');
		AddItem('Item 2');
		AddItem('Item 3');
		AddItem('Item 3');
	end;
	SearchColumnIndex := 0;
	Value := 'Item 2';
	with Items do
	begin
		SelectItem[FocusItem] := False;
	end;
	EndUpdate();
end
477
How do I unselect/deselect the item (DropDown style)
with ComboBox1 do
begin
	BeginUpdate();
	Style := EXCOMBOBOXLib_TLB.DropDown;
	Columns.Add('Def');
	with Items do
	begin
		AddItem('Item 1');
		AddItem('Item 2');
		AddItem('Item 3');
		AddItem('Item 3');
	end;
	SearchColumnIndex := 0;
	Value := 'Item 2';
	with Items do
	begin
		SelectItem[FocusItem] := False;
	end;
	EndUpdate();
end
288
How do I unselect an item

with ComboBox1 do
begin
	Columns.Add('Default');
	with Items do
	begin
		h := AddItem('Root 1');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
		SelectItem[h] := False;
	end;
end
155
How do I underline the numbers greater than a value

with ComboBox1 do
begin
	ConditionalFormats.Add('%0 >= 10',Null).Underline := True;
	Columns.Add('Numbers');
	Items.AddItem(OleVariant(1));
	Items.AddItem(OleVariant(2));
	Items.AddItem(OleVariant(10));
	Items.AddItem(OleVariant(20));
end
244
How do I underline an item

with ComboBox1 do
begin
	Columns.Add('Default');
	with Items do
	begin
		ItemUnderline[AddItem('underline')] := True;
	end;
end
245
How do I underline a cell or an item

with ComboBox1 do
begin
	Columns.Add('Default');
	with Items do
	begin
		CellCaptionFormat[OleVariant(AddItem('gets <u>underline</u> only a portion of text')),OleVariant(0)] := EXCOMBOBOXLib_TLB.exHTML;
	end;
end
246
How do I underline a cell

with ComboBox1 do
begin
	Columns.Add('Default');
	with Items do
	begin
		CellUnderline[OleVariant(AddItem('underline')),OleVariant(0)] := True;
	end;
end
325
How do I turn off the auto complete feature

with ComboBox1 do
begin
	AutoComplete := False;
	Columns.Add('Column');
	with Items do
	begin
		AddItem('Item 3');
		AddItem('Item 1');
		AddItem('Item 2');
	end;
end
328
How do I specify the width of the drop down window

with ComboBox1 do
begin
	WidthList[Null] := 100;
	AllowSizeGrip := True;
	Columns.Add('Column');
	with Items do
	begin
		AddItem('Item 3');
		AddItem('Item 1');
		AddItem('Item 2');
	end;
end
327
How do I specify the minimum width of the drop down window

with ComboBox1 do
begin
	MinWidthList := 100;
	AllowSizeGrip := True;
	Columns.Add('Column');
	with Items do
	begin
		AddItem('Item 3');
		AddItem('Item 1');
		AddItem('Item 2');
	end;
end
329
How do I specify the minimum height of the drop down window

with ComboBox1 do
begin
	MinHeightList := 100;
	AllowSizeGrip := True;
	Columns.Add('Column');
	with Items do
	begin
		AddItem('Item 3');
		AddItem('Item 1');
		AddItem('Item 2');
	end;
end
92
How do I specify the indentation of the child items relative to their parents

with ComboBox1 do
begin
	LinesAtRoot := EXCOMBOBOXLib_TLB.exGroupLinesAtRoot;
	Indent := 11;
	Columns.Add('Column');
	with Items do
	begin
		h := AddItem('Root 1');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
		h := AddItem('Root 2');
		InsertItem(h,Null,'Child');
	end;
end
330
How do I specify the height of the drop down window

with ComboBox1 do
begin
	HeightList[Null] := 400;
	MinWidthList := 100;
	AllowSizeGrip := True;
	Columns.Add('Column');
	with Items do
	begin
		AddItem('Item 3');
		AddItem('Item 1');
		AddItem('Item 2');
	end;
end
338
How do I specify the height of the control's label

with ComboBox1 do
begin
	LabelHeight := 34;
	Columns.Add('Column');
	with Items do
	begin
		AddItem('Item 3');
		AddItem('Item 1');
		AddItem('Item 2');
	end;
end
93
How do I specify the column where the tree lines / hierarchy are shown

with ComboBox1 do
begin
	LinesAtRoot := EXCOMBOBOXLib_TLB.exGroupLinesAtRoot;
	TreeColumnIndex := 1;
	Columns.Add('Column 1');
	Columns.Add('Column 2');
	with Items do
	begin
		h := AddItem('Root 1.1');
		CellCaption[OleVariant(h),OleVariant(1)] := 'Root 1.2';
		CellCaption[OleVariant(InsertItem(h,Null,'Child 1.1')),OleVariant(1)] := 'Child 1.2';
		CellCaption[OleVariant(InsertItem(h,Null,'Child 2.1')),OleVariant(1)] := 'Child 2.2';
		ExpandItem[h] := True;
		h := AddItem('Root 2.1');
		CellCaption[OleVariant(h),OleVariant(1)] := 'Root 2.2';
		CellCaption[OleVariant(InsertItem(h,Null,'Child 1.1')),OleVariant(1)] := 'Child 1.2';
	end;
end
483
How do I sort the index column as numeric

// InsertItem event - Occurs after a new item has been inserted to Items collection.
procedure TForm1.ComboBox1InsertItem(ASender: TObject; Item : HITEM);
begin
	with ComboBox1 do
	begin
		with Items do
		begin
			CellData[OleVariant(Item),OleVariant(1)] := OleVariant(ItemToIndex[Item]);
		end;
	end
end;

with ComboBox1 do
begin
	BeginUpdate();
	DrawGridLines := EXCOMBOBOXLib_TLB.exAllLines;
	ColumnAutoResize := True;
	ShowFocusRect := False;
	SingleEdit := True;
	with (IUnknown(Columns.Add('Next')) as EXCOMBOBOXLib_TLB.Column) do
	begin
		Def[EXCOMBOBOXLib_TLB.exCellPaddingLeft] := OleVariant(4);
		Def[EXCOMBOBOXLib_TLB.exHeaderPaddingLeft] := OleVariant(4);
	end;
	with (IUnknown(Columns.Add('Index')) as EXCOMBOBOXLib_TLB.Column) do
	begin
		AllowSizing := False;
		Width := 48;
		FormatColumn := '(((0 := (1 index ``)) mod 3) case ( default: ``; 0 : `<r><fgcolor=B0B0B0>`; 1: ``; 2 : `<c><fgcolor=808080>` )) + str(=:0)';
		Def[EXCOMBOBOXLib_TLB.exCellCaptionFormat] := OleVariant(1);
		SortType := EXCOMBOBOXLib_TLB.SortUserData;
		Position := 0;
	end;
	with Items do
	begin
		AddItem('Item 1');
		AddItem('Item 2');
		AddItem('Item 3');
		AddItem('Item 4');
		AddItem('Item 5');
		AddItem('Item 6');
		AddItem('Item 7');
		AddItem('Item 8');
		AddItem('Item 9');
		AddItem('Item 10');
	end;
	EndUpdate();
end
229
How do I sort the child items

with ComboBox1 do
begin
	Columns.Add('Default');
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
		SortChildren(h,OleVariant(0),False);
	end;
end
79
How do I sort descending a column, and put the sorting icon in the column's header

with ComboBox1 do
begin
	Columns.Add('Column');
	with Items do
	begin
		AddItem('Item 1');
		AddItem('Item 2');
		AddItem('Item 3');
	end;
	Columns.Item[OleVariant(0)].SortOrder := EXCOMBOBOXLib_TLB.SortDescending;
end
78
How do I sort ascending a column, and put the sorting icon in the column's header

with ComboBox1 do
begin
	Columns.Add('Column');
	with Items do
	begin
		AddItem('Item 3');
		AddItem('Item 1');
		AddItem('Item 2');
	end;
	Columns.Item[OleVariant(0)].SortOrder := EXCOMBOBOXLib_TLB.SortAscending;
end
72
How do I sort a column by numbers

with ComboBox1 do
begin
	(IUnknown(Columns.Add('desc')) as EXCOMBOBOXLib_TLB.Column).SortType := EXCOMBOBOXLib_TLB.SortNumeric;
	with Items do
	begin
		AddItem(OleVariant(1));
		AddItem(OleVariant(5));
		AddItem(OleVariant(10));
		SortChildren(0,OleVariant(0),False);
	end;
end
116
How do I show the tooltip quicker

with ComboBox1 do
begin
	ToolTipDelay := 1;
	(IUnknown(Columns.Add('tootip')) as EXCOMBOBOXLib_TLB.Column).ToolTip := 'this is a tooltip assigned to a column';
end
181
How do I show or hide the sorting icons, but still need sorting

with ComboBox1 do
begin
	(IUnknown(Columns.Add('Sorted')) as EXCOMBOBOXLib_TLB.Column).SortOrder := EXCOMBOBOXLib_TLB.SortAscending;
	Columns.Item[OleVariant(0)].DisplaySortIcon := False;
end
194
How do I show buttons for all cells in the column

with ComboBox1 do
begin
	with (IUnknown(Columns.Add('Button')) as EXCOMBOBOXLib_TLB.Column) do
	begin
		Def[EXCOMBOBOXLib_TLB.exCellHasButton] := OleVariant(True);
		Def[EXCOMBOBOXLib_TLB.exCellButtonAutoWidth] := OleVariant(True);
	end;
	Items.AddItem(' Button 1 ');
	Items.AddItem(' Button 2 ');
end
193
How do I show buttons for all cells in the column

with ComboBox1 do
begin
	(IUnknown(Columns.Add('Button')) as EXCOMBOBOXLib_TLB.Column).Def[EXCOMBOBOXLib_TLB.exCellHasButton] := OleVariant(True);
	Items.AddItem(OleVariant(0));
	Items.AddItem(OleVariant(1));
end
109
How do I show alternate rows in different background color

with ComboBox1 do
begin
	BackColorAlternate := RGB(240,240,240);
	Columns.Add('Column');
	with Items do
	begin
		AddItem('Item 1');
		AddItem('Item 2');
		AddItem('Item 3');
		AddItem('Item 4');
		AddItem('Item 5');
	end;
end
559
How do I set an extra data for each item
// MouseMove event - Occurs when the user moves the mouse.
procedure TForm1.ComboBox1MouseMove(ASender: TObject; Button : Smallint; Shift : Smallint; X : Integer; Y : Integer);
begin
	with ComboBox1 do
	begin
		i := ItemFromPoint[-1,-1,c,hit];
		OutputDebugString( i );
		OutputDebugString( Items.ItemData[i] );
	end
end;

with ComboBox1 do
begin
	BeginUpdate();
	Columns.Add('Default');
	with Items do
	begin
		ItemData[AddItem('method 1')] := 'your extra data of method 1';
		InsertItem(0,'your extra data of method 2','method 2');
	end;
	with Items do
	begin
		DefaultItem := AddItem('method 3');
		ItemData[0] := 'your extra data of method 3';
	end;
	EndUpdate();
end
286
How do I select an item

with ComboBox1 do
begin
	Columns.Add('Default');
	with Items do
	begin
		h := AddItem('Root 1');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
		SelectItem[h] := True;
	end;
end
347
How do I select a value

with ComboBox1 do
begin
	IntegralHeight := True;
	LinesAtRoot := EXCOMBOBOXLib_TLB.exGroupLinesAtRoot;
	TreeColumnIndex := 1;
	Columns.Add('Column 1');
	Columns.Add('Column 2');
	with Items do
	begin
		h := AddItem('Root 1.1');
		CellCaption[OleVariant(h),OleVariant(1)] := 'Root 1.2';
		CellCaption[OleVariant(InsertItem(h,Null,'Child 1.1')),OleVariant(1)] := 'Child 1.2';
		CellCaption[OleVariant(InsertItem(h,Null,'Child 2.1')),OleVariant(1)] := 'Child 2.2';
		ExpandItem[h] := True;
		h := AddItem('Root 2.1');
		CellCaption[OleVariant(h),OleVariant(1)] := 'Root 2.2';
		CellCaption[OleVariant(InsertItem(h,Null,'Child 1.1')),OleVariant(1)] := 'Child 1.2';
	end;
	Select[OleVariant(1)] := 'Root 1.2';
end
348
How do I select a value

with ComboBox1 do
begin
	IntegralHeight := True;
	LinesAtRoot := EXCOMBOBOXLib_TLB.exGroupLinesAtRoot;
	TreeColumnIndex := 1;
	Columns.Add('Column 1');
	Columns.Add('Column 2');
	with Items do
	begin
		h := AddItem('Root 1.1');
		CellCaption[OleVariant(h),OleVariant(1)] := 'Root 1.2';
		CellCaption[OleVariant(InsertItem(h,Null,'Child 1.1')),OleVariant(1)] := 'Child 1.2';
		CellCaption[OleVariant(InsertItem(h,Null,'Child 2.1')),OleVariant(1)] := 'Child 2.2';
		ExpandItem[h] := True;
		h := AddItem('Root 2.1');
		CellCaption[OleVariant(h),OleVariant(1)] := 'Root 2.2';
		CellCaption[OleVariant(InsertItem(h,Null,'Child 1.1')),OleVariant(1)] := 'Child 1.2';
	end;
	Value := 'Root 1.1';
end
466
How do I select a NULL/empty value

with ComboBox1 do
begin
	BeginUpdate();
	Style := EXCOMBOBOXLib_TLB.DropDownList;
	Columns.Add('Items');
	with Items do
	begin
		AddItem('Item 1');
		AddItem('Item 2');
		AddItem('Item 3');
		AddItem('Item 4');
		DefaultItem := InsertItem(Null,Null,'');
		ItemPosition[0] := 0;
		SortableItem[0] := False;
	end;
	Value := '';
	EndUpdate();
end
114
How do I search case sensitive, using your incremental search feature

with ComboBox1 do
begin
	AutoSearch := True;
	ASCIILower := '';
	with Columns do
	begin
		(IUnknown(Add('exStartWith')) as EXCOMBOBOXLib_TLB.Column).AutoSearch := EXCOMBOBOXLib_TLB.exStartWith;
		(IUnknown(Add('exContains')) as EXCOMBOBOXLib_TLB.Column).AutoSearch := EXCOMBOBOXLib_TLB.exContains;
	end;
	with Items do
	begin
		CellCaption[OleVariant(AddItem('text')),OleVariant(1)] := 'another text';
	end;
	with Items do
	begin
		CellCaption[OleVariant(AddItem('text')),OleVariant(1)] := 'another text';
	end;
end
262
How do I retrieve the focused item

with ComboBox1 do
begin
	Columns.Add('Default');
	with Items do
	begin
		h := AddItem('Root 1');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
		ItemBold[FocusItem] := True;
	end;
end
345
How do I remove the drop down's border

with ComboBox1 do
begin
	DropDownBorder := EXCOMBOBOXLib_TLB.None2;
end
69
How do I remove the control's border

with ComboBox1 do
begin
	Appearance := EXCOMBOBOXLib_TLB.None2;
end
451
How do I prevent scrolling the control's data after user does the sort

with ComboBox1 do
begin
	EnsureOnSort := False;
	Columns.Add('Column');
	with Items do
	begin
		AddItem('Item 3');
		AddItem('Item 1');
		AddItem('Item 2');
	end;
	PutItems(GetItems(OleVariant(0)),Null);
	PutItems(GetItems(OleVariant(0)),Null);
	PutItems(GetItems(OleVariant(0)),Null);
	Columns.Item[OleVariant(0)].SortOrder := EXCOMBOBOXLib_TLB.SortAscending;
end
585
How do I prevent changing the cell's state ( check-box state )
// CellStateChanging event - Fired before cell's state is about to be changed.
procedure TForm1.ComboBox1CellStateChanging(ASender: TObject; Cell : HCELL; var NewState : Integer);
begin
	with ComboBox1 do
	begin
		with Items do
		begin
			NewState := CellState[Null,OleVariant(Cell)];
		end;
	end
end;

with ComboBox1 do
begin
	BeginUpdate();
	LinesAtRoot := EXCOMBOBOXLib_TLB.exLinesAtRoot;
	with (IUnknown(Columns.Add('P1')) as EXCOMBOBOXLib_TLB.Column) do
	begin
		Def[EXCOMBOBOXLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	with (IUnknown(Columns.Add('P2')) as EXCOMBOBOXLib_TLB.Column) do
	begin
		Def[EXCOMBOBOXLib_TLB.exCellHasCheckBox] := OleVariant(True);
		PartialCheck := True;
	end;
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
	end;
	EndUpdate();
end
77
How do I perform my own/custom sort, using my extra strings

with ComboBox1 do
begin
	(IUnknown(Columns.Add('desc')) as EXCOMBOBOXLib_TLB.Column).SortType := EXCOMBOBOXLib_TLB.SortUserData;
	with Items do
	begin
		CellData[OleVariant(AddItem('A')),OleVariant(0)] := 'C';
		CellData[OleVariant(AddItem('B')),OleVariant(0)] := 'B';
		CellData[OleVariant(AddItem('C')),OleVariant(0)] := 'A';
		SortChildren(0,OleVariant(0),False);
	end;
end
76
How do I perform my own/custom sort, using my extra numbers

with ComboBox1 do
begin
	(IUnknown(Columns.Add('desc')) as EXCOMBOBOXLib_TLB.Column).SortType := EXCOMBOBOXLib_TLB.SortUserData;
	with Items do
	begin
		CellData[OleVariant(AddItem(OleVariant(0))),OleVariant(0)] := OleVariant(2);
		CellData[OleVariant(AddItem(OleVariant(1))),OleVariant(0)] := OleVariant(1);
		CellData[OleVariant(AddItem(OleVariant(2))),OleVariant(0)] := OleVariant(0);
		SortChildren(0,OleVariant(0),False);
	end;
end
82
How do I perform my own sorting when user clicks the column's header

with ComboBox1 do
begin
	SortOnClick := EXCOMBOBOXLib_TLB.exUserSort;
	Columns.Add('Column');
	Items.AddItem('Item 1');
	Items.AddItem('Item 2');
end
334
How do I lock or make read-only the control

with ComboBox1 do
begin
	Locked := True;
	Columns.Add('Column');
	with Items do
	begin
		AddItem('Item 3');
		AddItem('Item 1');
		AddItem('Item 2');
	end;
end
331
How do I let user to resize the drop down window, at runtime

with ComboBox1 do
begin
	AllowSizeGrip := True;
	Columns.Add('Column');
	with Items do
	begin
		AddItem('Item 3');
		AddItem('Item 1');
		AddItem('Item 2');
	end;
end
332
How do I let user to resize only the width of the drop down window, at runtime

with ComboBox1 do
begin
	AllowSizeGrip := True;
	AllowVResize := False;
	Columns.Add('Column');
	with Items do
	begin
		AddItem('Item 3');
		AddItem('Item 1');
		AddItem('Item 2');
	end;
end
333
How do I let user to resize only the height of the drop down window, at runtime

with ComboBox1 do
begin
	AllowSizeGrip := True;
	AllowHResize := False;
	MinWidthList := 100;
	MinHeightList := 100;
	Columns.Add('Column');
	with Items do
	begin
		AddItem('Item 3');
		AddItem('Item 1');
		AddItem('Item 2');
	end;
end
117
How do I let the tooltip being displayed longer

with ComboBox1 do
begin
	ToolTipPopDelay := 10000;
	(IUnknown(Columns.Add('tootip')) as EXCOMBOBOXLib_TLB.Column).ToolTip := 'this is a tooltip assigned to a column';
end
153
How do I highlight in italic the numbers greater than a value

with ComboBox1 do
begin
	ConditionalFormats.Add('%0 >= 10',Null).Italic := True;
	Columns.Add('Numbers');
	Items.AddItem(OleVariant(1));
	Items.AddItem(OleVariant(2));
	Items.AddItem(OleVariant(10));
	Items.AddItem(OleVariant(20));
end
154
How do I highlight in italic the numbers greater than a value

with ComboBox1 do
begin
	ConditionalFormats.Add('%0 >= 10',Null).StrikeOut := True;
	Columns.Add('Numbers');
	Items.AddItem(OleVariant(1));
	Items.AddItem(OleVariant(2));
	Items.AddItem(OleVariant(10));
	Items.AddItem(OleVariant(20));
end
152
How do I highlight in bold the numbers greater than a value

with ComboBox1 do
begin
	ConditionalFormats.Add('%0 >= 10',Null).Bold := True;
	Columns.Add('Numbers');
	Items.AddItem(OleVariant(1));
	Items.AddItem(OleVariant(2));
	Items.AddItem(OleVariant(10));
	Items.AddItem(OleVariant(20));
end
71
How do I hide the control's header bar

with ComboBox1 do
begin
	HeaderVisible := False;
end
258
How do I get the parent item

with ComboBox1 do
begin
	Columns.Add('Default');
	with Items do
	begin
		h := AddItem('Root 1');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
		ItemBold[ItemParent[ItemChild[h]]] := True;
	end;
end
232
How do I get the number or count of items

with ComboBox1 do
begin
	Columns.Add('Default');
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
	end;
	with Items do
	begin
		AddItem(OleVariant(ItemCount));
	end;
end
261
How do I get the number or count of child items

with ComboBox1 do
begin
	Columns.Add('Default');
	with Items do
	begin
		h := AddItem('Root 1');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
		AddItem(OleVariant(ChildCount[h]));
	end;
end
339
How do I get the handle of the drop down window

with ComboBox1 do
begin
	Columns.Add(ComboBox1.hWndDropDown);
end
263
How do I get the handle of the cell

with ComboBox1 do
begin
	Columns.Add('Default');
	with Items do
	begin
		h := AddItem('Root 1');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
		CellBold[Null,OleVariant(ItemCell[h,OleVariant(0)])] := True;
	end;
end
257
How do I get the first child item

with ComboBox1 do
begin
	Columns.Add('Default');
	with Items do
	begin
		h := AddItem('Root 1');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
		ItemBold[ItemChild[h]] := True;
	end;
end
486
How do I get sorted the column as string, numeric, date, date and time. Also how can it be applied to drop down filter panel

with ComboBox1 do
begin
	BeginUpdate();
	with (IUnknown(Columns.Add('Date')) as EXCOMBOBOXLib_TLB.Column) do
	begin
		SortType := EXCOMBOBOXLib_TLB.SortDate;
		DisplayFilterButton := True;
		DisplayFilterPattern := False;
		DisplayFilterDate := True;
		FilterList := Integer(EXCOMBOBOXLib_TLB.exShowFocusItem) Or Integer(EXCOMBOBOXLib_TLB.exShowCheckBox) Or Integer(EXCOMBOBOXLib_TLB.exSortItemsDesc);
	end;
	with (IUnknown(Columns.Add('DateTime')) as EXCOMBOBOXLib_TLB.Column) do
	begin
		SortType := EXCOMBOBOXLib_TLB.SortDateTime;
		DisplayFilterButton := True;
		DisplayFilterPattern := False;
		FilterList := Integer(EXCOMBOBOXLib_TLB.exShowFocusItem) Or Integer(EXCOMBOBOXLib_TLB.exShowCheckBox) Or Integer(EXCOMBOBOXLib_TLB.exSortItemsDesc);
	end;
	with (IUnknown(Columns.Add('Time')) as EXCOMBOBOXLib_TLB.Column) do
	begin
		SortType := EXCOMBOBOXLib_TLB.SortTime;
		DisplayFilterButton := True;
		DisplayFilterPattern := False;
		FilterList := Integer(EXCOMBOBOXLib_TLB.exShowFocusItem) Or Integer(EXCOMBOBOXLib_TLB.exShowCheckBox) Or Integer(EXCOMBOBOXLib_TLB.exSortItemsDesc);
		FormatColumn := 'time(value)';
	end;
	with (IUnknown(Columns.Add('Numeric')) as EXCOMBOBOXLib_TLB.Column) do
	begin
		SortType := EXCOMBOBOXLib_TLB.SortNumeric;
		DisplayFilterButton := True;
		FilterList := Integer(EXCOMBOBOXLib_TLB.exShowFocusItem) Or Integer(EXCOMBOBOXLib_TLB.exShowCheckBox) Or Integer(EXCOMBOBOXLib_TLB.exSortItemsDesc);
	end;
	with (IUnknown(Columns.Add('String')) as EXCOMBOBOXLib_TLB.Column) do
	begin
		DisplayFilterButton := True;
		FilterList := Integer(EXCOMBOBOXLib_TLB.exShowFocusItem) Or Integer(EXCOMBOBOXLib_TLB.exShowCheckBox) Or Integer(EXCOMBOBOXLib_TLB.exSortItemsDesc);
	end;
	with Items do
	begin
		h := AddItem('1/27/2010');
		CellCaption[OleVariant(h),OleVariant(1)] := '1/27/2010 10:00:00 AM';
		CellCaption[OleVariant(h),OleVariant(2)] := CellCaption[OleVariant(h),OleVariant(1)];
		CellCaption[OleVariant(h),OleVariant(3)] := OleVariant(1);
		CellCaption[OleVariant(h),OleVariant(4)] := CellCaption[OleVariant(h),OleVariant(3)];
		h := AddItem('1/27/2011');
		CellCaption[OleVariant(h),OleVariant(1)] := '1/27/2011 9:00:00 AM';
		CellCaption[OleVariant(h),OleVariant(2)] := CellCaption[OleVariant(h),OleVariant(1)];
		CellCaption[OleVariant(h),OleVariant(3)] := OleVariant(11);
		CellCaption[OleVariant(h),OleVariant(4)] := CellCaption[OleVariant(h),OleVariant(3)];
		h := AddItem('11/2/2010');
		CellCaption[OleVariant(h),OleVariant(1)] := '11/2/2010 9:00:00 AM';
		CellCaption[OleVariant(h),OleVariant(2)] := CellCaption[OleVariant(h),OleVariant(1)];
		CellCaption[OleVariant(h),OleVariant(3)] := OleVariant(2);
		CellCaption[OleVariant(h),OleVariant(4)] := CellCaption[OleVariant(h),OleVariant(3)];
	end;
	Columns.Item['DateTime'].DisplayFilterDate := False;
	EndUpdate();
end
96
How do I get ride of the rectangle arround focused item

with ComboBox1 do
begin
	ShowFocusRect := False;
	Columns.Add('Column');
	Items.AddItem(OleVariant(0));
	Items.AddItem(OleVariant(1));
end
470
How do I get notified once the user changes the Filter For field
// EditChange event - Fired when the user has taken an action that may have altered text in an edit control.
procedure TForm1.ComboBox1EditChange(ASender: TObject; ColIndex : Integer);
begin
	with ComboBox1 do
	begin
		OutputDebugString( 'ColIndex: ' );
		OutputDebugString( ColIndex );
		OutputDebugString( 'Label: ' );
		OutputDebugString( EditText[OleVariant(0)] );
		OutputDebugString( 'FilterFor: ' );
		OutputDebugString( EditText[OleVariant(-1)] );
	end
end;

with ComboBox1 do
begin
	BeginUpdate();
	FilterForVisible := True;
	FilterForBackColor := RGB(240,240,240);
	IntegralHeight := True;
	Columns.Add('Default');
	with Items do
	begin
		AddItem('Item 1');
		AddItem('Item 2');
		AddItem('Item 3');
		AddItem('Item 4');
		AddItem('Item 5');
	end;
	EndUpdate();
end
547
How do I get a list of interfaces the object implemenets

with ComboBox1 do
begin
	BeginUpdate();
	ColumnAutoResize := False;
	with (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('DAO.DBEngine.120'))) as DAO_TLB.PrivDBEngine) do
	begin
		rs := (IUnknown(OpenDatabase('C:\Program Files\Exontrol\ExComboBox\Sample\Access\sample.accdb',Null,Null,Null).OpenRecordset('Orders',Null,Null,Null)) as DAO_TLB.Recordset2);
	end;
	OutputDebugString( (IUnknown(ComObj.CreateComObject(ComObj.ProgIDToClassID('Exontrol.PropertiesList'))) as EXPROPERTIESLISTLib_TLB.PropertiesList).Interfaces[rs] );
	DataSource := (IUnknown(rs) as DAO_TLB.Recordset2);
	Value := OleVariant(10248);
	EndUpdate();
end
287
How do I find the selected item

with ComboBox1 do
begin
	Columns.Add('Default');
	with Items do
	begin
		h := AddItem('Root 1');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
		SelectItem[h] := True;
		ItemBold[SelectedItem[0]] := True;
	end;
end
294
How do I find the index of the item based on its handle

with ComboBox1 do
begin
	Columns.Add('Default');
	with Items do
	begin
		h := AddItem('Root 1');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
		ItemBold[ItemByIndex[ItemToIndex[h]]] := True;
	end;
end
293
How do I find the handle of the item based on its index

with ComboBox1 do
begin
	Columns.Add('Default');
	with Items do
	begin
		h := AddItem('Root 1');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
		ItemBold[ItemByIndex[1]] := True;
	end;
end
297
How do I find an item based on a path

with ComboBox1 do
begin
	Columns.Add('Default');
	with Items do
	begin
		h := AddItem('Root 1');
		InsertItem(h,Null,'Child 1');
		ItemData[InsertItem(h,Null,'Child 2')] := OleVariant(1234);
		ExpandItem[h] := True;
		ItemBold[FindPath['Root 1\Child 1']] := True;
	end;
end
296
How do I find an item

with ComboBox1 do
begin
	Columns.Add('Default');
	with Items do
	begin
		h := AddItem('Root 1');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
		ItemBold[FindItem['Child 2',OleVariant(0),Null]] := True;
	end;
end
107
How do I filter programatically the control

with ComboBox1 do
begin
	with (IUnknown(Columns.Add('Column')) as EXCOMBOBOXLib_TLB.Column) do
	begin
		DisplayFilterButton := True;
		FilterType := EXCOMBOBOXLib_TLB.exPattern;
		Filter := 'Item*';
	end;
	Items.AddItem('Item 1');
	Items.AddItem('');
	Items.AddItem('Item 2');
	ApplyFilter();
end
63
How do I filter for items that match exactly the specified string

with ComboBox1 do
begin
	with (IUnknown(Columns.Add('Column')) as EXCOMBOBOXLib_TLB.Column) do
	begin
		DisplayFilterButton := True;
		FilterType := EXCOMBOBOXLib_TLB.exFilter;
		Filter := 'Item 1';
	end;
	Items.AddItem('Item 1');
	Items.AddItem('Item 2');
	Items.AddItem('Item 3');
	ApplyFilter();
end
234
How do I expand or collapse an item

with ComboBox1 do
begin
	Columns.Add('Default');
	with Items do
	begin
		h := AddItem('Root');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
	end;
end
123
How do I expand automatically the items while user types characters to searching for something ( incremental searching )

with ComboBox1 do
begin
	ExpandOnSearch := True;
	LinesAtRoot := EXCOMBOBOXLib_TLB.exLinesAtRoot;
	AutoSearch := True;
	(IUnknown(Columns.Add('Column')) as EXCOMBOBOXLib_TLB.Column).AutoSearch := EXCOMBOBOXLib_TLB.exContains;
	with Items do
	begin
		InsertItem(InsertItem(AddItem('text'),Null,'some text'),Null,'another text');
		InsertItem(InsertItem(AddItem('text'),Null,'some text'),Null,'another text');
	end;
end
260
How do I enumerate the visible items

with ComboBox1 do
begin
	Columns.Add('Default');
	with Items do
	begin
		h := AddItem('Root 1');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
		h := AddItem('Root 2');
		ItemBold[FirstVisibleItem] := True;
		ItemBold[NextVisibleItem[FirstVisibleItem]] := True;
	end;
end
259
How do I enumerate the siblings items

with ComboBox1 do
begin
	Columns.Add('Default');
	with Items do
	begin
		h := AddItem('Root 1');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
		h := AddItem('Root 2');
		ItemBold[NextSiblingItem[FirstVisibleItem]] := True;
		ItemBold[PrevSiblingItem[NextSiblingItem[FirstVisibleItem]]] := True;
	end;
end
256
How do I enumerate the root items

with ComboBox1 do
begin
	Columns.Add('Default');
	with Items do
	begin
		h := AddItem('Root 1');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ExpandItem[h] := True;
		h := AddItem('Root 2');
		InsertItem(h,Null,'Child 1');
		InsertItem(h,Null,'Child 2');
		ItemBold[RootItem[0]] := True;
		ItemUnderline[RootItem[1]] := True;
	end;
end
40
How do I ensure that the focused item is visible, after the user does the sort

with ComboBox1 do
begin
	EnsureOnSort := True;
	Columns.Add('Column');
	with Items do
	begin
		AddItem('Item 3');
		AddItem('Item 1');
		AddItem('Item 2');
	end;
	PutItems(GetItems(OleVariant(0)),Null);
	PutItems(GetItems(OleVariant(0)),Null);
	PutItems(GetItems(OleVariant(0)),Null);
	Columns.Item[OleVariant(0)].SortOrder := EXCOMBOBOXLib_TLB.SortAscending;
end
108
How do I enlarge the drop down filter window

with ComboBox1 do
begin
	FilterBarDropDownHeight := '-320';
	with (IUnknown(Columns.Add('Column')) as EXCOMBOBOXLib_TLB.Column) do
	begin
		DisplayFilterButton := True;
		FilterBarDropDownWidth := '-320';
	end;
	Items.AddItem('Item 1');
	Items.AddItem('Item 2');
end
165
How do I enlarge or change the size of the control's scrollbars

with ComboBox1 do
begin
	ScrollHeight := 18;
	ScrollWidth := 18;
	ScrollButtonWidth := 18;
	ScrollButtonHeight := 18;
end
112
How do I enable the incremental search feature within a column

with ComboBox1 do
begin
	AutoSearch := True;
	with Columns do
	begin
		(IUnknown(Add('exStartWith')) as EXCOMBOBOXLib_TLB.Column).AutoSearch := EXCOMBOBOXLib_TLB.exStartWith;
		(IUnknown(Add('exContains')) as EXCOMBOBOXLib_TLB.Column).AutoSearch := EXCOMBOBOXLib_TLB.exContains;
	end;
	with Items do
	begin
		CellCaption[OleVariant(AddItem('text')),OleVariant(1)] := 'another text';
	end;
	with Items do
	begin
		CellCaption[OleVariant(AddItem('text')),OleVariant(1)] := 'another text';
	end;
end
138
How do I enable resizing the columns at runtime

with ComboBox1 do
begin
	ColumnsAllowSizing := True;
	MarkSearchColumn := False;
	HeaderVisible := False;
	Columns.Add('Column 1');
	Columns.Add('Column 2');
	DrawGridLines := EXCOMBOBOXLib_TLB.exVLines;
	with Items do
	begin
		CellCaption[OleVariant(AddItem('Item 1')),OleVariant(1)] := 'Sub Item 1';
	end;
	with Items do
	begin
		CellCaption[OleVariant(AddItem('Item 2')),OleVariant(1)] := 'Sub Item 2';
	end;
end
351
How do I enable resizing all the items at runtime

with ComboBox1 do
begin
	ItemsAllowSizing := EXCOMBOBOXLib_TLB.exResizeAllItems;
	DrawGridLines := EXCOMBOBOXLib_TLB.exHLines;
	Columns.Add('Column');
	Items.AddItem('Item 1');
	with Items do
	begin
		ItemHeight[AddItem('Item 2')] := 48;
	end;
	Items.AddItem('Item 3');
end
137
How do I enable resizing ( changing the height ) the items at runtime

with ComboBox1 do
begin
	ItemsAllowSizing := EXCOMBOBOXLib_TLB.exResizeItem;
	ScrollBySingleLine := True;
	Columns.Add('Column');
	Items.AddItem('Item 1');
	with Items do
	begin
		ItemHeight[AddItem('Item 2')] := 48;
	end;
	Items.AddItem('Item 3');
end
180
How do I enable or disable the entire column

with ComboBox1 do
begin
	Columns.Add('C1');
	(IUnknown(Columns.Add('Disabled')) as EXCOMBOBOXLib_TLB.Column).Enabled := False;
	with Items do
	begin
		CellCaption[OleVariant(AddItem(OleVariant(0))),OleVariant(1)] := '0.1';
	end;
	with Items do
	begin
		CellCaption[OleVariant(AddItem(OleVariant(1))),OleVariant(1)] := '1.1';
	end;
end
268
How do I enable or disable a cell

with ComboBox1 do
begin
	Columns.Add('C1');
	Columns.Add('C2');
	with Items do
	begin
		h := AddItem('Cell 1');
		CellCaption[OleVariant(h),OleVariant(1)] := 'Cell 2';
		CellEnabled[OleVariant(h),OleVariant(1)] := False;
	end;
end
553
How do I display the position of the item with 0-padding

with ComboBox1 do
begin
	BeginUpdate();
	(IUnknown(Columns.Add('Items')) as EXCOMBOBOXLib_TLB.Column).FormatColumn := '((1 apos ``) lpad `00`) + `. `  + value';
	with Items do
	begin
		AddItem('Item A');
		AddItem('Item B');
		AddItem('Item C');
		AddItem('Item D');
	end;
	EndUpdate();
end
349
How do I display the icons being selected in the control's label

with ComboBox1 do
begin
	Images('gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTql' + 
	'Vq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0' + 
	'ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yN' + 
	'AOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=');
	Columns.Add('Column');
	with Items do
	begin
		CellImage[OleVariant(AddItem('Image 1')),OleVariant(0)] := 1;
		CellImage[OleVariant(AddItem('Image 2')),OleVariant(0)] := 2;
		CellImage[OleVariant(AddItem('Image 3')),OleVariant(0)] := 3;
	end;
	AssignEditImageOnSelect[0] := True;
	Value := 'Image 2';
end